home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 66
/
Vol 66.iso
/
games
/
bob_espo.swf
/
scripts
/
__Packages
/
State.as
< prev
next >
Wrap
Text File
|
2013-04-24
|
1KB
|
58 lines
class State
{
function State(_mcRef, _bNormal)
{
this.mcRef = _mcRef;
this.sState = "";
if(_bNormal == false)
{
if(MainBroadcaster.Instance == null)
{
var _loc4_ = new MainBroadcaster();
}
MainBroadcaster.Instance.doAddListener(this);
}
else
{
if(Broadcaster.Instance == null)
{
var _loc5_ = new Broadcaster();
}
Broadcaster.Instance.doAddListener(this);
}
}
function cleanUp()
{
Broadcaster.Instance.doRemoveListener(this);
}
function doAction()
{
this[this.sState]();
}
function setState(_sState)
{
if(this.sState != _sState)
{
this.sState = _sState;
this.mcRef.gotoAndStop(_sState);
}
}
function doPause()
{
this.mcRef.mcState.stop();
}
function doUnPause()
{
this.mcRef.mcState.play();
}
function stateFinished()
{
var _loc2_ = false;
if(this.mcRef.mcState._currentframe >= this.mcRef.mcState._totalframes)
{
_loc2_ = true;
}
return _loc2_;
}
}